#尝试1
from collections import Counter
names = ["荷妈","管家仔","于素秋","Joe鲍","阿庆","管家仔","于素秋"]
rename = dict(Counter(names))
print([key for key,value in rename.items()if value > 1])

#尝试2
names = ["荷妈","管家仔","于素秋","Joe鲍","阿庆","管家仔","于素秋"]
renames = []
num = {}
for name in names:
    if names.count(name)>1:
        renames.append(name)
        num[name] = names.count(name)
    else:
        print(name)
print(num)
